character_model = {
    "id": 0,
    "name": "青松",  # 姓名
    "avatar": "",
    "sex": "女",

    "special": [],  # 特殊
    "tianfu": [],  # 天赋
    "chenghao": [],  # 称号

    "hp": 500,  # 生命
    "maxHp": 999,  # 人物最大生命
    "neili": 1000,  # 内力
    "maxNeili": 3000,  # 人物最大内力
    "ap": 100,  # 体力
    "neilishuxing": "hunhe",  # 内力属性 阴 | 阳 | 混合

    "zizhi": 99,  # 资质
    "shane": 50,  # 善恶

    "lianji": 33,  # 连击 公式：[ zizhi / 3]
    "twice": 99 - 33,  # 两次行动 公式：[ 99 - lianji]
    "baoji": 6,  # 暴击

    "neishang": 0,  # 内伤
    "zhongdu": 0,  # 中毒

    "gongji": 40,  # 攻击
    "fangyu": 40,  # 防御
    "qinggong": 40,  # 轻功

    "quanzhang": 50,  # 拳掌/腿法
    "jianfa": 50,  # 剑法
    "daofa": 50,  # 刀法
    "qimen": 50,  # 奇门
    "anqi": 50,  # 暗器

    "yiliao": 50,  # 医疗
    "yongdu": 50,  # 用毒

    "wuqi": {},  # 武器
    "fangju": {},  # 防具

    "waigongList": [],  # 学会外功列表
    "neigongList": [],  # 学会内功列表
    "qinggongList": [],  # 学会轻功列表

    "jin": 0,  # 金
    "mu": 0,  # 木
    "shui": 0,  # 水
    "huo": 0,  # 火
    "tu": 0,  # 土

    "zaxue": 0,  # 杂学
    "daoxue": 0,  # 道学
    "foxue": 0,  # 佛学
    "yinlv": 0,  # 音律
    "shushu": 0,  # 术数
    "dushu": 0,  # 毒术

    "chuyi": 0,  # 厨艺
    "zhiyao": 0,  # 制药
    "qiaojiang": 0,  # 巧匠
}

wu_gong_model = {
    "name": "五毒神掌",
    "type": "waigong",  # 秘籍类型 外功 | 内功 | 轻功
    "weili": 1000,  # 威力
    "exp": [1000, 2000, 3000, 4000, 5000, 6000, 7000, 8000, 9000, 10000, 10000],  # 每升一级的经验
    "expend": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],  # 每升一级 运功时的消耗
    "special": [  # 到等级时获得的特殊效果 [运功时 | 攻击时 | 受击时 | 死亡时]
        {"level": 4, "running": None, "attack": None, "strike": None, "die": None},
        {"level": 11, "running": None, "attack": None, "strike": None, "die": None},
    ],
    "condition": {  # 学习条件
        "sex": {'=': "女"},
        "neilishuxing": "yin",
        "shane": {'>': 50},
    },
    "fahui": {  # 发挥
        "dushu": {"count": 100, "ratio": 80},
        "zaxue": {"count": 20, "ratio": 20},
    },
    "promotion": {  # 每升一级提升人物属性
        "mp": 100,
        "dushu": 10,
        "zhiyao": 10,
        "quanzhang": 10,
        "anqi": 10,
    }
}

enemy_model = {
    "id": 0,
    "ai": "",  # ai 执行文件
    "name": "青松",  # 姓名
    "avatar": "",
    "sex": "女",

    "special": [],  # 特殊

    "hp": 500,  # 生命
    "neili": 1000,  # 内力
    "ap": 100,  # 体力
    "neilishuxing": "hunhe",  # 内力属性 阴 | 阳 | 混合

    "lianji": 33,  # 连击 公式：[ zizhi / 3]
    "twice": 99 - 33,  # 两次行动 公式：[ 99 - lianji]
    "baoji": 6,  # 暴击

    "neishang": 0,  # 内伤
    "zhongdu": 0,  # 中毒

    "gongji": 40,  # 攻击
    "fangyu": 40,  # 防御
    "qinggong": 40,  # 轻功

    "yiliao": 50,  # 医疗
    "yongdu": 50,  # 用毒

    "wuqi": {},  # 武器
    "fangju": {},  # 防具

    "waigongList": [],  # 学会外功列表
    "neigongList": [],  # 学会内功列表
    "qinggongList": [],  # 学会轻功列表

    "jin": 0,  # 金
    "mu": 0,  # 木
    "shui": 0,  # 水
    "huo": 0,  # 火
    "tu": 0,  # 土

    "inventory": [  # 背包物品
        {"key": 1, "amount": 1},
        {"key": 2, "amount": 1},
        {"key": 3, "amount": 1},
    ],

    "spoils": {  # 战利品
        "random": [  # 伪随机数
            {
                "radio": 3,
                "count": 2,  # 从 keys 里面随机抽取 count 战利品
                "keys": [
                    {"type": "inventory", "key": 1, "amount": 1, "maxAmount": 0},
                    {"type": "inventory", "key": 2, "amount": 1, "maxAmount": 0},
                    {"type": "materials", "key": "jinbi", "amount": 100, "maxAmount": 10000},
                    {"type": "materials", "key": 'mucai', "amount": 100, "maxAmount": 10000},
                ],
            },
            {
                "radio": 30,
                "count": 1,
                "keys": [
                    {"type": "inventory", "key": 1, "amount": 1, "maxAmount": 0},
                    {"type": "inventory", "key": 2, "amount": 1, "maxAmount": 0},
                    {"type": "materials", "key": "jinbi", "amount": 100, "maxAmount": 10000},
                    {"type": "materials", "key": 'mucai', "amount": 100, "maxAmount": 10000},
                ],
            }
        ],
        "must": [  # 必得
            {"type": "inventory", "key": 2, "amount": 1, "maxAmount": 0},
            {"type": "materials", "key": "jinbi", "amount": 100, "maxAmount": 10000},
        ]
    },
}

map_model = {
    "name": "地图名称",
    "tiled": [],
    "description": "",  # 地图简介
    "win": "",  # 胜利条件
    "lose": "",  # 失败条件
    "events": [  # 在 某个回合时触发 [ 开始 | 结束 ]
        {"round": 1, "start": [], "end": []},
        {"round": 10, "start": [], "end": []},
    ],
    "loop": {"start": [], "end": []},  # 每回合执行 [ 开始 | 结束 ]
    "enemyWave": [  # 敌人
        {
            "id": 1,
            "characterCount": 3,  # 玩家出战人物数量
            "waveList": [
                {"count": 2, "enemyList": [{}, {}, {}, {}, {}]},
                {"count": 3, "enemyList": [{}, {}, {}, {}, {}]},
                {"count": 1, "enemyList": [{}, {}]},
            ],
            "spoils": [
                {"type": "inventory", "key": 1, "count": 1},
                {"type": "materials", "key": "jinbi", "count": 10000},
                {"type": "materials", "key": 'mucai', "count": 10000},
            ]
        },
    ]
}

battle_model = {
    "nuqi": 0,  # 怒气
    "pozhan": 0,  # 破绽
    "bingfeng": 0,  # 冰封
    "zhuoshao": 0,  # 灼烧
    "liuxue": 0,  # 流血
    "fengxue": 0,  # 封穴
    "neishang": 0,  # 内伤
    "zhongdu": 0,  # 中毒
}
